package com.mercury.console.controller;

import net.guerlab.sms.core.domain.NoticeData;
import net.guerlab.sms.core.handler.SendHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author mercury
 * @date 2022/7/15 12:00
 */
@RestController
public class SmsController {

    @Autowired
    private SendHandler sendHandler;



    @GetMapping("/sendSms")
    public void show(){
        NoticeData noticeData = new NoticeData();
        noticeData.setType("yingxiao");
        Map<String, String> params = new HashMap<>();
        params.put("code","4215");
        noticeData.setParams(params);




        sendHandler.send(noticeData,"18731686090");

    }
}
